/**
 * @description 工作流相关的接口请求
 * @author xzp
 */
import request from '@/utils/requestActive'
import requestAdmin from '@/utils/request'
import qs from 'qs'

/** *********************************************************** 公用 ******************************************************** */

/**
 * 我的请假列表-进行中
 *
 * @export
 * @return {*}
 */
export function getMyActiveHistoryTask(data) {
  return request({
    url: '/activitiHistory/getMyActiveHistoryTask',
    method: 'GET',
    params: data
  })
}

/**
 * 我的请假列表-历史
 *
 * @export
 * @return {*}
 */
export function getMyHistoryTask(data) {
  return request({
    url: '/activitiHistory/getMyHistoryTask',
    method: 'GET',
    params: data
  })
}

/**
 * 启动实例
 *
 * @export
 * @return {*}
 */
export function startProcess(data) {
  return request({
    url: '/processInstance/startProcess',
    method: 'GET',
    params: data
  })
}

/**
 * 我的请假列表-历史流程
 *
 * @export
 * @return {*}
 */
export function getProcessInstanceTaskHistory(data) {
  return request({
    url: '/activitiHistory/getProcessInstanceTaskHistory',
    method: 'GET',
    params: data
  })
}

/** *********************************************************** 能源 ******************************************************** */
/**
 * 我的请假列表-待办
 *
 * @export
 * @return {*}
 */
export function getTaskList(data) {
  return request({
    url: '/BusNyAlarm/getTaskList',
    method: 'GET',
    params: data
  })
}

/**
 * 处置任务-启动
 *
 * @export
 * @return {*}
 */
export function startProcessBusFormInsert(data) {
  return request({
    url: '/BusNyAlarm/startProcessBusFormInsert',
    method: 'POST',
    params: data
  })
}

/**
 * 动态表单渲染
 *
 * @export
 * @return {*}
 */
export function formDataShow(data) {
  return request({
    url: '/BusNyAlarm/formDataShow',
    method: 'GET',
    params: data
  })
}

/**
 * 动态表单数据保存
 *
 * @export
 * @return {*}
 */
export function formDataSave(data) {
  return request({
    url: '/BusNyAlarm/formDataSave',
    method: 'POST',
    params: data
  })
}

/**
 * 查看历史记录
 *
 * @export
 * @return {*}
 */
export function getHistoryProcessData(data) {
  return request({
    url: '/BusNyAlarm/getHistoryProcessData',
    method: 'GET',
    params: data
  })
}

/**
 * 查看历史记录
 *
 * @export
 * @return {*}
 */
export function NyHistoryProcessData(data) {
  return requestAdmin({
    url: '/admin/ny/NyAlarmInfoManager/HistoryProcessData',
    method: 'POST',
    data: qs.stringify(data)
  })
}

/** *********************************************************** 安全 ******************************************************** */

/**
 * 待办任务列表
 *
 * @export
 * @return {*}
 */
export function getAqTaskList(data) {
  return request({
    url: '/BusAqAlarm/getTaskList',
    method: 'GET',
    params: data
  })
}

/**
 * 处置任务-启动
 *
 * @export
 * @return {*}
 */
export function startAqProcessBusFormInsert(data) {
  return request({
    url: '/BusAqAlarm/startProcessBusFormInsert',
    method: 'POST',
    params: data
  })
}

/**
 * 表单渲染
 *
 * @export
 * @return {*}
 */
export function formDataAqShow(data) {
  return request({
    url: '/BusAqAlarm/formDataShow',
    method: 'GET',
    params: data
  })
}

/**
 * 表单保存
 *
 * @export
 * @return {*}
 */
export function formDataAqSave(data) {
  return request({
    url: '/BusAqAlarm/formDataSave',
    method: 'POST',
    params: data
  })
}

/**
 * 查看历史记录
 *
 * @export
 * @return {*}
 */
export function getHistoryAqProcessData(data) {
  return request({
    url: '/BusAqAlarm/getHistoryProcessData',
    method: 'GET',
    params: data
  })
}

/**
 * 查看历史记录
 *
 * @export
 * @return {*}
 */
export function AqHistoryProcessData(data) {
  return requestAdmin({
    url: '/admin/aq/AqAlarmInfoManager/HistoryProcessData',
    method: 'POST',
    data: qs.stringify(data)
  })
}

/** *********************************************************** 消防 ******************************************************** */

/**
 * 待办任务列表
 *
 * @export
 * @return {*}
 */
export function getXfTaskList(data) {
  return request({
    url: '/BusXfAlarm/getTaskList',
    method: 'GET',
    params: data
  })
}

/**
 * 处置任务-启动
 *
 * @export
 * @return {*}
 */
export function startXfProcessBusFormInsert(data) {
  return request({
    url: '/BusXfAlarm/startProcessBusFormInsert',
    method: 'POST',
    params: data
  })
}

/**
 * 表单渲染
 *
 * @export
 * @return {*}
 */
export function formDataXfShow(data) {
  return request({
    url: '/BusXfAlarm/formDataShow',
    method: 'GET',
    params: data
  })
}

/**
 * 表单保存
 *
 * @export
 * @return {*}
 */
export function formDataXfSave(data) {
  return request({
    url: '/BusXfAlarm/formDataSave',
    method: 'POST',
    params: data
  })
}

/**
 * 查看历史记录
 *
 * @export
 * @return {*}
 */
export function getHistoryXfProcessData(data) {
  return request({
    url: '/BusXfAlarm/getHistoryProcessData',
    method: 'GET',
    params: data
  })
}

/**
 * 查看历史记录
 *
 * @export
 * @return {*}
 */
export function XfHistoryProcessData(data) {
  return requestAdmin({
    url: '/admin/xf/XfAlarmInfoManager/HistoryProcessData',
    method: 'POST',
    data: qs.stringify(data)
  })
}

/** *********************************************************** 环保 ******************************************************** */

/**
 * 待办任务列表
 *
 * @export
 * @return {*}
 */
export function getHbTaskList(data) {
  return request({
    url: '/BusHbAlarm/getTaskList',
    method: 'GET',
    params: data
  })
}

/**
 * 处置任务-启动
 *
 * @export
 * @return {*}
 */
export function startHbProcessBusFormInsert(data) {
  return request({
    url: '/BusHbAlarm/startProcessBusFormInsert',
    method: 'POST',
    params: data
  })
}

/**
 * 表单渲染
 *
 * @export
 * @return {*}
 */
export function formDataHbShow(data) {
  return request({
    url: '/BusHbAlarm/formDataShow',
    method: 'GET',
    params: data
  })
}

/**
 * 表单保存
 *
 * @export
 * @return {*}
 */
export function formDataHbSave(data) {
  return request({
    url: '/BusHbAlarm/formDataSave',
    method: 'POST',
    params: data
  })
}

/**
 * 查看历史记录
 *
 * @export
 * @return {*}
 */
export function getHistoryHbProcessData(data) {
  return request({
    url: '/BusHbAlarm/getHistoryProcessData',
    method: 'GET',
    params: data
  })
}

/**
 * 查看历史记录
 *
 * @export
 * @return {*}
 */
export function HbHistoryProcessData(data) {
  return requestAdmin({
    url: '/admin/hb/HbAlarmInfoManager/HistoryProcessData',
    method: 'POST',
    data: qs.stringify(data)
  })
}
